package com.lxw.study.structural.flyweight;

public class Character implements CharFlyweight<Character> {
    private final char value;

    public Character(char value) {
        this.value = value;
    }

    @Override
    public int compareTo(Character anotherCharacter) {
        return this.value - anotherCharacter.value;
    }

    @Override
    public String toString() {
        char buf[] = {value};
        return String.valueOf(buf);
    }

}
